<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Interactive Menu with Frames</title>
    <link href="https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap" rel="stylesheet">
    <style>
        body {
            margin: 0;
            font-family: 'Roboto', sans-serif;
            background: #f0f4f8;
            display: flex;
            height: 100vh;
            overflow: hidden;
        }
        .sidebarB {
            width: 200px;
            background: linear-gradient(135deg, #5a9bf6, #7ec8ff);
            color: white;
            height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 1em;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        }
        .sidebarB h2 {
            font-size: 1.8em;
            text-align: center;
            margin-bottom: 1em;
            border-bottom: 2px solid white;
            padding-bottom: 0.5em;
            font-weight: 700;
        }
        .sidebarB ul {
            list-style: none;
            padding: 0;
            margin: 0;
            flex-grow: 1;
        }
        .sidebarB ul li {
            padding: 0.8em 1.2em;
            cursor: pointer;
            transition: background 0.3s, transform 0.3s;
            border-radius: 5px;
            margin: 0.3em 0;
            display: flex;
            align-items: center;
            font-size: 1.1em;
            font-weight: 700;
        }
        .sidebarB ul li:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }
        .sidebarB ul li i {
            margin-right: 10px;
            font-size: 1.5em;
        }
        .sidebarB .footer {
            text-align: center;
            padding: 1em 0;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
            font-size: 0.9em;
        }
        .catalogContent {
            flex: 1;
            padding: 2em;
            overflow-y: auto;
        }
        .directory {
            list-style-type: none;
            padding-left: 0;
        }
        .directory > li {
            border-radius: 6px;
            padding: 10px;
            font-size: 1.2em;
            background-color: #97a0a6;
            color: white;
            border-bottom: 1px solid #ccc;
            cursor: pointer;
            margin-bottom: 5px;
            transition: background 0.3s;
        }
        .directory > li:hover {
            background-color: #7ec8ff;
        }
        .directory li.child {
            background-color: white;
            color: #333;
            font-size: 1em;
            padding: 10px;
            border-bottom: 1px solid #ccc;
            margin-left: 20px;
        }
        .directory li.child:hover {
            background-color: #f0f0f0;
        }
        /*课程目录结束*/

        .sidebar {
            width: 200px;
            background: linear-gradient(135deg, #1e90ff, #00bfff);
            color: white;
            height: 100vh;
            display: flex;
            flex-direction: column;
            padding: 1em;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        }
        .sidebar h2 {
            font-size: 1.8em;
            text-align: center;
            margin-bottom: 1em;
            border-bottom: 2px solid white;
            padding-bottom: 0.5em;
            font-weight: 500;
        }
        .sidebar ul {
            list-style: none;
            padding: 0;
            margin: 0;
            flex-grow: 1;
        }
        .sidebar ul li {
            padding: 0.8em 1.2em;
            cursor: pointer;
            transition: background 0.3s, transform 0.3s;
            border-radius: 5px;
            margin: 0.3em 0;
            display: flex;
            align-items: center;
            font-size: 1.1em;
            font-weight: 400;
        }
        .sidebar ul li:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.05);
        }
        .sidebar ul li i {
            margin-right: 10px;
            font-size: 1.2em;
        }
        .sidebar .footer {
            text-align: center;
            padding: 1em 0;
            border-top: 1px solid rgba(255, 255, 255, 0.3);
            font-size: 0.9em;
        }


        .content {
            flex: 1;
            display: flex;
            flex-wrap: wrap;
            padding: 2em;
            transition: transform 0.3s ease;
            justify-content: center;
            align-items: center;
        }
        .frame {
            width: 90%;
            height: 20%;
            padding: 1em;
            box-sizing: border-box;
            transition: transform 0.3s ease;
        }
        .single-frame {
            width: 90%;
            height: 90%;
            padding: 1em;
            box-sizing: border-box;
            transition: transform 0.3s ease;
        }
        .frame-content {
            background: white;
            height: 90%;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            padding: 1em;
            box-sizing: border-box;
            overflow: hidden;
            position: relative;
        }
        .frame:hover {
            transform: scale(1.05);
            z-index: 1;
        }
        .fullscreen-iframe {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
            z-index: 9999;
            background: white;
        }
        .back-button {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #0f3f70;
            color: white;
            padding: 0.5em 1em;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1em;
            font-weight: 600;
            z-index: 10000;
        }
        .submenu {
            display: none;
            position: absolute;
            top: 0;
            left: 200px;
            width: 200px;
            background: rgba(30, 144, 255, 0.9);
            color: white;
            padding: 1em;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
            z-index: 1;
            transition: transform 0.3s ease;
            border-radius: 0 10px 10px 0;
        }
        .submenu ul {
            list-style: none;
            padding: 0;
        }
        .submenu ul li {
            padding: 0.5em 1em;
            cursor: pointer;
            transition: background 0.3s;
            border-radius: 5px;
            margin: 0.5em 0;
            font-size: 1em;
            font-weight: 400;
        }
        .submenu ul li:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .submenu.active {
            display: block;
        }
        .collapse-button {
            padding: 0.5em;
            background: transparent;
            color: white;
            border: none;
            cursor: pointer;
            font-size: 1.5em;
            display: block;
            text-align: center;
            margin: 0.5em auto;
        }
        /*左侧边栏结束*/
    </style>
    <script>
        function showFrames(frameId) {
            var contentDivs = document.querySelectorAll('.catalogContent > div');
            contentDivs.forEach(function(div) {
                div.style.display = 'none';
            });
            document.getElementById(frameId).style.display = 'block';
        }
    </script>
</head>
<body>
    <div class="sidebarB">
        <h2>目录</h2>
        <ul>
            <li onclick="showFrames('javaFrame')"><i class="fas fa-folder-open"></i>JAVA Programming</li>
            <li onclick="showFrames('statisticsFrame')"><i class="fas fa-folder-open"></i>Statistics</li>
            <li onclick="showFrames('dataStructureFrame')"><i class="fas fa-folder-open"></i>Data Structure</li>
            <li onclick="showFrames('webDesignFrame')"><i class="fas fa-folder-open"></i>Web Design & Programming</li>
            <li onclick="showFrames('databaseManagementFrame')"><i class="fas fa-folder-open"></i>Database Management</li>
        </ul>
        <div class="footer">
            &copy; 2024 My Website
        </div>
    </div>
    <div class="catalogContent" id="catalogContent">
        <div class="frame single-frame" id="single-frame">
            <div class="frame-content">
                <h2>课程简介</h2>
                <p>默认显示的单一框架内容。</p>
            </div>
        </div>
        <div id="javaFrame" style="display: none;">
            <ul class="directory">
                <li>教科书</li>
                <li>L1-Variables</li>
                <a href="/quiz1_video"><li class="child">1.1 视频课</li></a>
                <a href="/quiz1_ppt"><li class="child">1.2 PPT</li></a>
                <a href="/quiz1_textbook"><li class="child">1.3 教科书</li></a>
                <a href="/quiz1_Question"><li class="child">1.4 练习题</li></a>
                <li>L2-Control Statements</li>
                <a href="/quiz2_video"><li class="child">2.1 视频课</li></a>
                <a href="/quiz2_ppt"><li class="child">2.2 PPT</li></a>
                <a href="/quiz2_textbook"><li class="child">2.3 教科书</li></a>
                <a href="/quiz2_Question"><li class="child">2.4 练习题</li></a>
                <li>L3-Classes & Methods</li>
                <a href="/quiz3_video"><li class="child">3.1 视频课</li></a>
                <a href="/quiz3_ppt"><li class="child">3.2 PPT</li></a>
                <a href="/quiz3_textbook"><li class="child">3.3 教科书</li></a>
                <a href="/quiz3_Question"><li class="child">3.4 练习题</li></a>
                <li>L4-Instance Methods</li>
                <a href="/quiz4_video"><li class="child">4.1 视频课</li></a>
                <a href="/quiz4_ppt"><li class="child">4.2 PPT</li></a>
                <a href="/quiz4_textbook"><li class="child">4.3 教科书</li></a>
                <a href="/quiz4_Question"><li class="child">4.4 练习题</li></a>
                <li>L5-Classes</li>
                <a href="/quiz5_video"><li class="child">5.1 视频课</li></a>
                <a href="/quiz5_ppt"><li class="child">5.2 PPT</li></a>
                <a href="/quiz5_textbook"><li class="child">5.3 教科书</li></a>
                <a href="/quiz5_Question"><li class="child">5.4 练习题</li></a>
                <li>L6-Arrays</li>
                <a href="/quiz6_video"><li class="child">6.1 视频课</li></a>
                <a href="/quiz6_ppt"><li class="child">6.2 PPT</li></a>
                <a href="/quiz6_textbook"><li class="child">6.3 教科书</li></a>
                <a href="/quiz6_Question"><li class="child">6.4 练习题</li></a>
            </ul>
        </div>
        <div id="statisticsFrame" style="display: none;">
            <ul class="directory">
                <li>Statistics 1</li>
                <li>Statistics 2</li>
                <li>Statistics 3</li>
            </ul>
        </div>
        <div id="dataStructureFrame" style="display: none;">
            <ul class="directory">
                <li>Data Structure 1</li>
                <li>Data Structure 2</li>
                <li>Data Structure 3</li>
            </ul>
        </div>
        <div id="webDesignFrame" style="display: none;">
            <ul class="directory">
                <li>Web Design 1</li>
                <li>Web Design 2</li>
                <li>Web Design 3</li>
            </ul>
        </div>
        <div id="databaseManagementFrame" style="display: none;">
            <ul class="directory">
                <li>Database Management 1</li>
                <li>Database Management 2</li>
                <li>Database Management 3</li>
            </ul>
        </div>
    </div>
    <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</body>
</html>
